package {
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.system.Security;
	
	import mailru.MailruCall;
	import mailru.MailruCallEvent;
	
	[SWF(width="760", height="760", backgroundColor="#FFFFFF")]
	public class ie_test extends Sprite {
		public function ie_test() {
			super();
			Security.allowDomain('*');
			Security.loadPolicyFile('http://content.foto.my.mail.ru/crossdomain.xml');
			
			MailruCall.init('ie_test', 'bffabd0b7f3efde77db43cbda99acbf1');
			MailruCall.addEventListener(Event.COMPLETE, mailruReadyHandler);
		}
		
		private function readHash(e: MailruCallEvent=null): void {
			MailruCall.exec('mailru.app.users.requireInstallation', function(ie: MailruCallEvent): void {
			}, ['widget', 'notifications']);			
		}
		
		protected function mailruReadyHandler(e: Event=null): void {
			MailruCall.exec('mailru.app.utils.hash.read');
			MailruCall.addEventListener('app.appReadHash', readHash);
		}		
	}
}